package zuoye0506;

import java.util.Scanner;

public class managerTest {

	public static void main(String[] args) {
		Scanner in = new Scanner(System.in);
		manager test = new manager();
		String newname;
		while (true) {
			System.out.println("1.增加新客户，2.显示所有客户，3.查找用户，4.查找序号，5.退出");
			System.out.print("请选择：");
			// 选择序号
			int a = in.nextInt();
			System.out.println(">>>>>>>>>>>>>>>>>>>>>>>>>>>>>");
			if (a == 1) {
				System.out.print("输入新客户的名字：");
				// newname接收新用户名。
				newname = in.next();
				test.add(newname);
			} else if (a == 2) {
				test.show();
			} else if (a == 3) {
				System.out.print("输入需要查找的用户名：");
				String findname = in.next();
				test.find(findname);
				System.out.println("查找结果为：" + test.find(findname));
			} else if (a == 4) {
				System.out.print("请输入序号:");
				int number = in.nextInt();
				System.out.println("第" + number + "号的客户为：" + test.seek(number));
			} else if (a == 5) {
				System.out.println("正在退出。");
				break;
			}

		}

	}

}
